/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-11-17 15:47:32
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2023-11-17 17:40:44
 * @FilePath: /chatServer/test.cpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// /*
//  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
//  * @Date: 2023-11-17 15:47:32
//  * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
//  * @LastEditTime: 2023-11-17 17:38:23
//  * @FilePath: /chatServer/test.cpp
//  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
//  */
// #include <iostream>
// #include <mysql_connection.h>
// #include <mysql_driver.h>
// #include <cppconn/driver.h>
// #include <cppconn/resultset.h>
// #include <cppconn/statement.h>

// using namespace std;
// using namespace sql;

// int main()
// {
//     try
//     {
//         // 创建MySQL连接
//         Driver *driver = get_driver_instance();
//         Connection *con = driver->connect("tcp://127.0.0.1:3306", "debian-sys-maint", "0XNuWDfAbUjxwCv4");

//         // 连接到test数据库
//         con->setSchema("chat");

//         // 执行一条查询语句
//         Statement *stmt = con->createStatement();
//         ResultSet *res = stmt->executeQuery("insert into users VALUES(0,'administrator','123456',1)");
//         while (res->next())
//         {
//             std::cout << res->getString("name") << std::endl;
//         }

//         // 清理连接资源
//         delete res;
//         delete stmt;
//         delete con;
//     }
//     catch (SQLException &e)
//     {
//         cout << "SQLException: " << e.getErrorCode() << " " << e.what() << endl;
//     }
//     return 0;
// }